Skip to content

Add queue API routes and sample data#89

Merged
goldlabelapps merged 4 commits intomasterfrom
staging
Apr 18, 2026
Merged

Add queue API routes and sample data#89
goldlabelapps merged 4 commits intomasterfrom
staging

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

Introduce a Queue API surface: add individual route modules (create, drop, empty, get) and register them via app/api/queue/init.py (APIRouter includes). Add supporting artifacts: a sample linkedin.csv and SQL schema (create_queue_table.sql). Also update queue implementation and top-level app/api/routes.py to wire the new queue endpoints.

Introduce a Queue API surface: add individual route modules (create, drop, empty, get) and register them via app/api/queue/__init__.py (APIRouter includes). Add supporting artifacts: a sample linkedin.csv and SQL schema (create_queue_table.sql). Also update queue implementation and top-level app/api/routes.py to wire the new queue endpoints.
Reorganize CSV fixtures into a centralized queue CSV directory. Several files were renamed/moved into app/api/queue/csv (apollo: apollo-contacts-export (3).csv, apollo-contacts-export (4).csv, big.csv, seed.csv; linkedin: linkedin.csv from app/api/prospects; magento: magento_products.csv and magento_products_sample.csv). Removed legacy files: app/api/queue/linkedin.csv (old export), app/api/queue/sql/create_queue_table.sql, and app/static/csv/magento_products.csv.
Add endpoints and sample data to support importing LinkedIn CSVs and altering the queue schema.

- Add app/api/queue/routes/import_linkedin.py: POST /queue/import/linkedin reads a linkedin_sample.csv, skips lines starting with 'Notes:', and inserts rows into the queue table (sets created/updated, hidden=false, collection='prospects').
- Add app/api/queue/routes/alter.py: POST /queue/alter/add-column runs an ALTER TABLE to add a column and returns an appropriate meta response; handles 'already exists' errors.
- Add sample CSV at app/api/queue/csv/linkedin/linkedin_sample.csv for testing/import.
- Update app/api/queue/__init__.py to include the new routers (import_linkedin and alter).
- Small change in app/api/queue/routes/get.py: rename response key record_count -> queued and reorder schema/most_recent keys.

These changes make it easier to seed the queue from LinkedIn exports and modify the queue schema dynamically.
Update package version to 2.2.5 and remove the "schema" field from the queue GET response (commented out). This avoids returning internal schema details in the API response; no other functional changes.
@goldlabelapps goldlabelapps merged commit fb14863 into master Apr 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant